# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=grantleetheme
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE PIM mail related libraries"
arch="all !armhf"
url="https://kontact.kde.org/"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
makedepends="extra-cmake-modules knewstuff-dev ki18n-dev grantlee-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/grantleetheme-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build

	# grantleethemetest is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "grantleethemetest"
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="4bf3dd73238fffa4db2c2ec8d619100570847684e2fc5ec84b2f23c651b505127cfa019d0a8ceb9f8b0237124f53007d7052d67d7476f0f43a51e29b92e787cf  grantleetheme-20.04.3.tar.xz"
